MIDIGET

Section: C Library Functions (3)
Index Return to Main Contents

BSD mandoc
TCLM April 7, 1993  

NAME

midiget - tclm command to get one event from a track in a Standard MIDI File  

SYNOPSIS

mfileId track  

DESCRIPTION

is a tclm(3) command that gets one event from the specified track of a Standard MIDI File. The first argument specifies the Standard MIDI File and should be a value returned by either midiread(3) or midimake(3). The second argument specifies the track from which to get the event. Successive calls to on the same track will get successive events from that track. midirewind(3) can be used to return to the beginning of the track.  

RETURN VALUES

returns the event in a form that can be used by midiput(3). If no more events are available in the track ``EOT'' is returned.

The return values for the non-meta events are as follows:

channelpressure channel value
This MIDI event changes the pressure parameter for an entire channel. It has two arguments. The first the the channel number and the second is the pressure value.
keypressure channel key value
This event changes the pressure for one key. It has three arguments. The first is the channel number, the second the key value and the last the pressure value.
noteoff channel pitch velocity
This event turns a note off. It has three arguments. The first argument is the channel, the second is the pitch and the third is the velocity.
noteon channel pitch velocity
This event turns a note on. It takes three arguments. The first arguments is the channel, the second is the pitch and the third is the velocity.
parameter channel param_number setting
This event sets a parameter value. It has three arguments. The first is the channel, the second is the parameter number and the third is the setting.
pitchwheel channel setting
This event sets the pitchwheel. It has two arguments. The first is the channel and the second is the setting. takes care of converting to two 7 bit values to one integer value. This integer value is returned in the setting field.
program channel setting
This event changes the program for a channel. It has two arguments. The first argument is the channel and the second is the setting.
sysex [cont] {byte_list}
This event is used to transfer implementation specific information over MIDI It has one or two arguments. If the first argument is the string ``cont'' then the sysex message which follows was a continued sysex message (ie it began with a 0xf7). If ``cont'' is not specified, then the message is a normal sysex message (ie it began with a 0xf0). The last argument is the data. It is a list in which each element is one byte of the message.

The return values for the meta events are:

metachanprefix {byte_list}
I really don't know what this event does, so I had to guess on the format. It has one argument, which is a list of bytes.
metacpy copyright
This event is a text event that is used for copyrights. It has one argument which is the copyright.
metacue cue
This event is a text event that is used for cue information. It has one argument which is the cue.
metaeot
This event marks the end of a track. All tracks must have one. It has no arguments
metainstname name
This event is a text event used for instrument information. It has one argument which is the instrument data.
metakey key_name key_type
This event is used to specify a key signature. It has two arguments. The first is one of the following strings: ``C flat'' ``G flat'' ``D flat'' ``A flat'' ``E flat'' ``B flat'' ``F'' ``C'' ``G'' ``D'' ``A'' ``E'' ``B'' ``F sharp'' or ``C sharp '' (I hope I got those right - it should 7 flats to 7 sharps). The second argument is either: ``major'' or ``minor''
metalyric lyric
This event is a text event used for lyrics. It has one argument which is the lyric.
metamarker marker
This event is a text event used for marker information. It has one argument which is the marker data.
metaseqname name
This event is a text event used for naming sequences. It has one argument which is the sequence name.
metaseqnum number
This event is used for numbering sequences. It has one argument which is the sequence number.
metaseqspec
I don't know anything about this event, and it is not currently implemented.
metasmpte hour minute second frame fractional_frame
This event is used for supplying SMPTE information. It has five arguments. This first argument is the hour position, the second is the minute position and the third the second position. The fourth argument is the frame number and the fifth the fractional frame number.
metatempo tempo
This event is used to specify a tempo, and has one argument. Unlike midiput(3) which can take the argument as either beats per minute or microseconds per quarter-note, always uses beats per minute.
metatext text
This event is a generic text event. It has one argument which is a string.
metatime numerator denominator clocks 32nds
This event is used for specifying the time signature. It has four arguments. The first is the numerator of the time signature and the second is the denominator. The third argument is how many clocks per metronome beat and the fourth is how many 32nd notes per quarter note. takes care of converting the denominator from a negative power of two, which is the form specified by Standard MIDI files to the integer value.

 

SEE ALSO

tclm(1), midiread(3), midimake(3), midirewind(3), midiput(3)  

AUTHORS

Mike Durian - durian@advtech.uswest.com


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
SEE ALSO
AUTHORS

This document was created by man2html, using the manual pages.
Time: 00:28:08 GMT, March 30, 2022